﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace t_205_verk_hopur_12.Models
{
    public class CategoryRepository : ICategoryRepository
    {
        private MittTVDataContext db = new MittTVDataContext();

        public IQueryable<Category> GetAllCategories()
        {
            return db.Categories;
        }

        public Category GetSingleCategory(int id)
        {
            return db.Categories.SingleOrDefault(c => c.ID == id);
        }
    }
}
